# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=systemc
pkgver=2.3.3
pkgrel=1
pkgdesc="C++ library for modeling and describing complex hardware systems"
url="https://www.accellera.org/downloads/standards/systemc"
arch="x86 x86_64" # upstream only supports x86*
license="Apache-2.0"
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="https://www.accellera.org/images/downloads/standards/$pkgname/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver/objdir"

prepare() {
	mkdir -p "$builddir"
	default_prepare
}

build() {
	../configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-unix-layout=yes \
		--enable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="831255f8e76e1cf776e0407c92c7a0b70ba63cf6b1785a2df372a6394440944540a8ae62264ef5293a7b951bd8b37de089ef0dbc0ee2d0354e69ce552c020ca2  systemc-2.3.3.tar.gz"
